/**
 * Created by zengy on 2017/6/7.
 */
angular.module('mainApp.survey', ['ui.router'])
    .config(function($stateProvider) {
        $stateProvider
            .state({//模板列表页面
                name : 'survey/index',
                url:'/survey/index',
                templateUrl:'views/survey/index.html?v='+new Date().getMinutes(),
                controller:'surveyCtrl'
            })
        ;
    })
    .directive('repeatDesignPageFinish',function(){
        return {
            link: function(scope){
                if(scope.$last){

                }
            }
        }
    })
    .controller('surveyCtrl',function($scope) {
        $scope.$emit('arg',1);
        layer.load(0, {shade: false}); //0代表加载的风格，支持0-2
        new HttpRequest().orderSurvey(function (res) {
            layer.closeAll();
            if(res.code=='000'){
                $scope.datas=res.data;
                $scope.$apply()
            }else{
                layer.msg('获取失败！');
            }

        })



    });
